﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace MiniFox.Data
{
    /// <summary>
    /// 
    /// </summary>
    /// <typeparam name="TEntity"></typeparam>
    public interface IDataCommand<TEntity> where TEntity : class
    {
        /// <summary>
        /// 查询命令执行超时时长，默认30秒(单位：秒)
        /// </summary>
        int TimeOut
        {
            get;
            set;
        }
        /// <summary>
        /// 
        /// </summary>
        string ConnectionString { get; }
        /// <summary>
        /// 
        /// </summary>
        event EventHandler<CommandErrorEventArgs> OnError;
        /// <summary>
        /// 
        /// </summary>
        event EventHandler<CommandEventArgs> CommandExecuted;
        /// <summary>
        /// 
        /// </summary>
        event EventHandler<CommandEventArgs> CommandCreated;
    }
}
